from django.db import models

# Create your models here.
class CateModel(models.Model):
    cate = models.CharField(max_length=20)
    class Meta:
        db_table='cate'

class GoodsModel(models.Model):
    name = models.CharField(max_length=20)
    price = models.IntegerField()
    pic = models.ImageField(upload_to='static/media')
    cate = models.ForeignKey(CateModel,on_delete=models.CASCADE)
    class Meta:
        db_table='goods'